package com.example.demo.config;

//import org.springframework.context.annotation.Configuration;
//import org.springframework.security.config.annotation.web.builders.HttpSecurity;
//import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
//import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;

/**
 * @Author: lu
 * @Date: 2024-12-30-11:05
 * @Description:
 */
//@Configuration
//@EnableWebSecurity
//public class SecurityConfig extends WebSecurityConfigurerAdapter {
//
//    @Override
//    protected void configure(HttpSecurity http) throws Exception {
//        http.authorizeRequests()
//                .antMatchers("/v2/api-docs", "/swagger-resources/**", "/swagger-ui/**").authenticated() // 保护 Swagger 相关路径
//                .anyRequest().permitAll() // 其他请求允许访问
//                .and()
//                .httpBasic(); // 启用基本身份验证
//    }
//}
